package com.plant.tool;

public class HotTool {
	
	public double test(int num){//计算热度
		double hot = 0;
		if(num>=1&&num<=10){
			hot=num;
		}else if(num>10&&num<=100){
						if(num>10&&num<=20){
						   hot=(num-10)*0.1+10;
						}else if(num>20&&num<=30){
							hot=(num-10)*0.1+10;
						}else if(num>30&&num<=40){
							hot=(num-10)*0.1+10;
						}else if(num>40&&num<=50){
							hot=(num-10)*0.1+10;
						}else if(num>50&&num<=60){
							hot=(num-10)*0.1+10;
						}else if(num>60&&num<=70){
							hot=(num-10)*0.1+10;
						}else if(num>70&&num<=80){
							hot=(num-10)*0.1+10;
						}else if(num>80&&num<=90){
							hot=(num-10)*0.1+10;
						}else if(num>90&&num<=100){
							hot=(97-10)*0.1+10;
						}
		}else if(num>100&&num<=1000){
						if(num>100&&num<=200){
						    hot=(num-100)*0.01+19;
						}else if(num>200&&num<=300){
							hot=(num-100)*0.01+19;
						}else if(num>300&&num<=400){
							hot=(num-100)*0.01+19;
						}else if(num>400&&num<=500){
							hot=(num-100)*0.01+19;
						}else if(num>500&&num<=600){
							hot=(num-100)*0.01+19;
						}else if(num>600&&num<=700){
							hot=(num-100)*0.01+19;
						}else if(num>700&&num<=800){
							hot=(num-100)*0.01+19;
						}else if(num>800&&num<=900){
							hot=(num-100)*0.01+19;
						}else if(num>900&&num<=1000){
							hot=(num-100)*0.01+19;
						}
		}else if(num>1000&&num<=10000){
						if(num>1000&&num<=2000){
							hot=(num-1000)*0.001+28;
						}else if(num>2000&&num<=3000){
							hot=(num-1000)*0.001+28;
						}else if(num>3000&&num<=4000){
							hot=(num-1000)*0.001+28;
						}else if(num>4000&&num<=5000){
							hot=(num-1000)*0.001+28;
						}else if(num>5000&&num<=6000){
							hot=(num-1000)*0.001+28;
						}else if(num>6000&&num<=7000){
							hot=(num-1000)*0.001+28;
						}else if(num>7000&&num<=8000){
							hot=(num-1000)*0.001+28;
						}else if(num>8000&&num<=9000){
							hot=(num-1000)*0.001+28;
						}else if(num>9000&&num<=10000){
							hot=(num-1000)*0.001+28;
						}
		}
		return hot;
	}
//	public static void main(String[] args) {
//		HotTool up=new HotTool();
//		DecimalFormat df=new DecimalFormat("#####0.0");
//		System.out.println(df.format(up.test(4589))+"��");
//	}
//	
}
